package ch.fusun.baron.player;

import ch.fusun.baron.core.injection.Inject;
import ch.fusun.baron.data.DataUpdate;
import ch.fusun.baron.player.api.MarriageService;

/**
 *
 */
public class MarryDataUpdate implements DataUpdate {

	private Player male;
	private Player female;
	@Inject
	private transient MarriageService marriageService;

	/**
	 * Kryo
	 */
	public MarryDataUpdate() {
	}

	/**
	 * @param male
	 *            The male
	 * @param female
	 *            The female
	 */
	public MarryDataUpdate(Player male, Player female) {
		this.male = male;
		this.female = female;
	}

	@Override
	public void update() {
		marriageService.marry(male, female);
	}

}
